import {
    observable,
    action,
    computed,
    useStrict,
    autorun,
    extendObservable
} from 'mobx';

// useStrict(true);


class GameStore {
    static getInstance() {
        if (!window.gameStore) {
            window.gameStore = new GameStore();
        }
        return window.gameStore;
    }

    // constructor() {
    //     autorun(() => console.log('GameStore_autorun', this.gameTime));
    // }

    @observable gameTime = 0;

    @action setData(data) {
        this.gameTime = data;
    }

}
let gameStore = GameStore.getInstance() ;

export default gameStore;